"""
元组的使用
"""

# t8=("黑马程序", "bite", "bite", "bite")
# num=t8.count("bite")
# print(f"bite出现的次数为{num}")
# index=0
# while index < len(t8):
#     print(f"元素为{t8[index]}")
#     index+=1
# for range in t8:
#     print(f"{range}")
# t9=(1, 1, 2, [1, 2, 3, 4, 5])
# t9[3][0]=9
# for range in t9:
#     print(f"{range}")

"""
字符串的使用
"""

# my_str= "itheima is xun"
# print(f"{my_str[2]}")
# print(f"{my_str[-len(my_str)]}")
#
# num=my_str.index("is")
# print(f"{num}")
#
# my_str=my_str.replace("is","new")
# print(f"{my_str}")
#
# my_list=my_str.split(" ")
# print(f"{my_list}")
#
# my_str2="12 12 12"
# my_newstr=my_str2.strip(" ")
# print(my_newstr)
#
# print(my_newstr.count("12"))

"""

切片

"""
# my_list=(1,2,3,4,5,6)
# result=my_list[1:4]
# print(result,f"{type(result)}")
#
# my_str=(1,2,3,4,5,6)
# result2=my_str[::2]
# print(result2)
#
# result3=my_list[::-1]
# print(result3)
#
# result4=my_str[:0:-2]
# print(result4)
#
# my_newstr="学python 来黑马程序员 月薪过万"
# my_newstr2=my_newstr[::-1]
#
# my_newstr3=my_newstr2[::-1][9:14]
# print(my_newstr3)
#
# my_newstr4=my_newstr2[::-1].split(" ")[1].replace("来","")
# print(my_newstr4)

"""

Set集合

"""
# my_set={"1","2",3,4,5,5,5}
# # print(my_set)
# #
# # my_set.add(9)
# # print(my_set)
# #
# # print(my_set.pop())
# # print(my_set)
# #
# # # my_set.clear()
# # # print(my_set,type(my_set))
# #
# my_set2={"1","2",3,4,8,7}
# # print(my_set.difference(my_set2))
# print(my_set.difference_update(my_set2))
# my_set=my_set.union(my_set2)
# print(my_set)
#
# print(len(my_set2))
#
# for element in my_set:
#     print(element)

# my_list=['黑马程序员','黑马程序员','传智播客',"itheima","itheima","itheima"]
# my_set=set()
# for element in my_list:
#     my_set.add(element)
# print(my_set)

"""
dict字典
"""

# my_dict2={}
#
# # my_dict={"王力":12,"wa":12}
# # print(my_dict["王力"])
#
# stuscore_dict={"王力鸿":{"语文":77,"数学":66,"英语":33},
#                "周杰伦":{"语文":88,"数学":86,"英语":55},
#                "林俊杰":{"语文":99,"数学":96,"英语":66}}
# score=stuscore_dict["王力鸿"]["语文"]
# print(score)
# stuscore_dict["张信哲"]=66
# print(stuscore_dict)
# key2=stuscore_dict.keys()
# print(key2)
# for element in key2:
#     print(stuscore_dict[element])
#
# for key in stuscore_dict:
#     if stuscore_dict[key]=={'语文': 77, '数学': 66, '英语': 33}:
#         print(stuscore_dict[key])
#
# print(f"{'abd'>'0bf'}")